package lekcja2.zad7;

public class ArrayUtils {
    public static int[] sort(int[] tab) {
        int size = tab.length - 1;
        for (int i = 0; i < tab.length - 1; i++) {
            for (int j = 0; j < size; j++) {
                if (tab[j] > tab[j + 1]) {
                    int temp = tab[j];
                    tab[j] = tab[j + 1];
                    tab[j + 1] = temp;
                }
            }
            size--;
        }
        return tab;
    }
}
